package com.rightrule;

import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.ConfigurableApplicationContext;

////开启服务发现功能
//@EnableDiscoveryClient
//排除关于数据库相关的
@SpringBootApplication
@MapperScan("com.rightrule")
@Slf4j
public class RightFlowApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(RightFlowApplication.class, args);
        String[] beanDefinitionNames = context.getBeanDefinitionNames();

        for (int i = 0; i <beanDefinitionNames.length ; i++) {
            System.out.println(beanDefinitionNames[i]);
            System.out.println("来源于"+context.getBeanFactory().getBeanDefinition(beanDefinitionNames[i]).getResourceDescription());
        }


        context.close();
        log.info("Application Start!!!!");
    }

}
